<?php

namespace App\Http\Controllers\Backend;
use App\Http\Controllers\BaseController;
use App\Http\Middleware\AdminAuth;
use App\Params\Backend\SettingUpdateParam;
use App\Services\Base\SettingService;
use App\Services\User\UserService;
use Illuminate\Http\Request;
/**
 * 参数配置管理控制器
 *
 * @package App\Http\Controllers\H5
 * @author WangBin
 * @date 2022-01/11
 */
class SettingController extends BaseController
{
    public function __construct()
    {

    }

    /**
     * 保存参数配置
     *
     * @return
     */
    public function update()
    {
        $param = SettingUpdateParam::create();
        $result = SettingService::getInstance()->update($param);
        return $this->success($result);
    }

    /**
     * 获取参数配置
     *
     * @return
     */
    public function get()
    {
        $result = SettingService::getInstance()->get();
        return $this->success($result);
    }
}
